﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace DailyDiet.Models
{
    /// <summary>
    /// 缓存类
    /// </summary>
    [Serializable]
    public class Cache<T>
    {
        public DateTime SetTime {
            get;
            set;
        }

        public DateTime DeadTime { set; get; }

        public T CacheObject { get; set; }
        /*
        public void GetObjectData(SerializationInfo info, StreamingContext context) {
            info.AddValue(nameof(SetTime), SetTime, typeof(DateTime));
        }

        public Cache(SerializationInfo info, StreamingContext context)
        {
            _name = (String)info.GetValue("Name", typeof(String));
        }
        */

    }
}
